package cn.com.biz;

import java.util.List;

import cn.com.dao.DoctorDao;
import cn.com.entity.Doctor;


public class DoctorBiz {
	//医生的biz文件
	private DoctorDao doctordao;

	public DoctorDao getDoctordao() {
		return doctordao;
	}

	public void setDoctordao(DoctorDao doctordao) {
		this.doctordao = doctordao;
	}
	//医生登录功能
	public Doctor doctorLogin(Doctor doctor){
		 Doctor d=doctordao.doctorLogin(doctor);
		return d;
	}
	//查询所有医生
		public List<Doctor> selectAllNews(){
			List<Doctor> list=doctordao.selectAllDoctor();
			return list;
		}
		//查询一个医生
		public Doctor selectOneDoctor(Doctor doctor){
			Doctor d=doctordao.selectOneDoctor(doctor);
			return d; 
		}
		//添加医生
		public boolean addDoctor(Doctor doctor){
			boolean bool=doctordao.addDoctor(doctor);
			return bool;
		}
		//更新医生
		public boolean updateDoctor(Doctor doctor){
			boolean bool=doctordao.updateDoctor(doctor);
			return bool;
		}
		//删除医生
			public boolean deleteDoctor(Doctor doctor){
				boolean bool=doctordao.deleteDoctor(doctor);
				return bool;
			}
}
